<template>
  <div>
    <van-tabs>
      <van-tab
        v-for="item in menusList.channels"
        :title="item.name"
        :key="item.id"
      >
        内容 {{}}
      </van-tab>
    </van-tabs>
  </div>
</template>

<script>
import { mapState } from "vuex";
import { HomeApi } from "/p5/P5_认真学习/headline/src/api/homeAPI";
export default {
  data() {
    return {
      queryInfo: {
        page: 1,
        per_page: 4,
      },
      menusList: [],
    };
  },
  methods: {
    async getmenusList() {
      var { data: res } = await HomeApi();
      console.log(res);
      this.menusList = res.data;
      console.log(this.$store.state.tokenInfo.token);
    },
  },
  created() {
    this.getmenusList();
  },

  computed: {
    ...mapState(["tokenInfo"]),
  },
};
</script>

<style></style>
